#include <iostream>
#include "ThreadPool.h"

int sum(int a, int b) {
    // std::cout << "sum" << a << b << std::endl;
    return a+b;
}


int main() {
    std::cout << "hello threadpool." << std::endl;
    ThreadPool pool;
    pool.start();
    std::future<int> result1 = pool.submitTask(sum, 1, 2);
    std::future<int> result2 = pool.submitTask(sum, 3, 4);
    std::cout << result1.get() << std::endl;
    std::cout << result2.get() << std::endl;

    return 0;
}